import './index.scss';
import { ImgResize } from './core/img-resize';
import * as $ from 'jQuery';
Object.assign(window, {ImgResize: ImgResize});
$.when( $.ready ).then(function() {
    console.log('dom');
    let container = document.querySelector('.image-container') as HTMLElement;
    let settings: any = {};
    let img = new ImgResize(container);
    document.querySelector('.remove').addEventListener('click',() => {
        img.destroy();
    });
    document.querySelector('.show').addEventListener('click',() => {
        img.show();
    });
    document.querySelector('.hidden').addEventListener('click',() => {
        img.hidden();
    });
    document.querySelector('.get-settings').addEventListener('click',() => {
        settings = img.getSettings()
        console.log(settings);
    });
    document.querySelector('.set-settings').addEventListener('click',() => {
        img.updateSetting(settings)
    });
});
